
$(function(){
	
	var cnzz_site_id = 1274904819;
	
	var cnzz_s_tag =document.createElement('script'); 
	cnzz_s_tag.type ='text/javascript'; 
	cnzz_s_tag.async =true; 
	cnzz_s_tag.charset= 'utf-8'; 
	cnzz_s_tag.src ='//s22.cnzz.com/z_stat.php?id='+cnzz_site_id+'&web_id='+cnzz_site_id+'&async=1'; 
	document.getElementsByTagName('body')[0].appendChild(cnzz_s_tag);

	try {
		//声明_czc对象:
		_czc = _czc || [];
		//绑定siteid，请用您的siteid替换下方"XXXXXXXX"部分
		_czc.push(["_setAccount", cnzz_site_id]);
	} catch (e) {
		window.setTimeout(function(){
			try {
				//声明_czc对象:
				_czc = _czc || [];
				//绑定siteid，请用您的siteid替换下方"XXXXXXXX"部分
				_czc.push(["_setAccount", cnzz_site_id]);
			} catch (e) {}
		},600);
	}
});

simple.buryingPoint = function(category,action,label,value,nodeid){
	try {
		_czc.push(["_trackEvent",category,action,label,value,nodeid]);
	} catch (e) {
		window.setTimeout(function(){
			try {
				_czc.push(["_trackEvent",category,action,label,value,nodeid]);
			} catch (e) {}
		},800);
		
	}
	
};

simple.buryingPointInPC = function(category,action,label,value,nodeid){
	simple.buryingPoint("PC-"+category,action,label,value,nodeid);
};

simple.buryingPointInH5 = function(category,action,label,value,nodeid){
	simple.buryingPoint("H5-"+category,action,label,value,nodeid);
};

simple.tracking = function(dataJson){
	dataJson.apiUrl = "tracking/trace";
	var settingConfig = {isShow:false,isAlert:false,isShowAjaxError:false};
	ajaxForUpdate(dataJson,function(rs){
		//success.
	},settingConfig);//,async:false
}

//动态加载点击事件
simple.loadTrackingAjax = function(jqueryObj){
	if(jqueryObj == null) {jqueryObj = $(".trackingAjax");}
	
	try{
		jqueryObj.click(function(){
			loadTrackingPageOnload20210519($(this));
		});
	}catch(e){
		console.error(e);
	}
}

try{
	$(function(){
		loadTrackingPageOnload20210519($("#tracking"));
		loadTrackingClick20210519();
	})
}catch(e){
	console.error(e);
}



function loadTrackingPageOnload20210519(jqueryObj){
	var eventKey = jqueryObj.attr("data-eventKey");
	var eventValue = jqueryObj.attr("data-eventValue");
	var eventSource = jqueryObj.attr("data-eventSource");
	var parentEventKey = jqueryObj.attr("data-parentEventKey");
	if(eventKey != null){
		var dataJson = {};
		dataJson.eventKey = eventKey;
		if(eventValue != null){dataJson.eventValue = eventValue;}
		if(eventSource != null){dataJson.eventSource = eventSource;}
		if(parentEventKey != null){dataJson.parentEventKey = parentEventKey;}
		simple.tracking(dataJson);
	}
}

function loadTrackingClick20210519(){
	$(".tracking").click(function(){
		loadTrackingPageOnload20210519($(this));
	});
}

/**
 * baidu total.
 */
simple.loadBaiDuTotal = function(){
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "https://hm.baidu.com/hm.js?6e4546399bca08edad0aff0061ae8316";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
}

/**
 * customer service
 */
simple.loadCustomerService = function(){
	var script = '(function() {var _53code = document.createElement("script");_53code.src = "https://tb.53kf.com/code/code/3f0c9037dc3a2d44aaa09c7b9ede6d8e5/1";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(_53code, s);})();';
	eval(script);
}

/**
 * customer service by window open.
 */
simple.loadCustomerServiceByWindowOpen = function(){
	window.open('https://tb.53kf.com/code/client/3f0c9037dc3a2d44aaa09c7b9ede6d8e5/1', '_blank', 'height=600,width=800,top=50,left=400,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no');
}


